<template>
  <div class="news-preview-wrapper">
    <h4 class="panel-title">最新资讯</h4>
    <div class="news-list">
        <div class="news-item">
            <div class="news-text">
                <p class="news-title">智慧庭院</p>
                <p class="news-meta">2025-11-07 16:57:25 <i class="el-icon-view"></i> 13</p>
            </div>
        </div>
        <div class="news-item">
            <div class="news-text">
                <p class="news-title">智慧步道</p>
                <p class="news-meta">2025-11-07 16:39:36 <i class="el-icon-view"></i> 21</p>
            </div>
        </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "NewsPreview",
  props: ['config']
  // 这里的预览是静态的，因为它通常需要调用API获取真实资讯列表
  // 我们只做样式预览
}
</script>

<style scoped>
.news-preview-wrapper { padding: 15px; background-color: #fff; margin-top: 10px; }
.panel-title { margin: 0 0 10px 0; font-size: 16px; }
.news-item { display: flex; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.news-item:last-child { border-bottom: none; }
.news-text { flex: 1; }
.news-title { margin: 0 0 8px 0; font-size: 14px; color: #333; }
.news-meta { margin: 0; font-size: 12px; color: #999; }
</style>
